home *** CD-ROM | disk | FTP | other *** search
- glClear(GL_COLOR_BUFFER_BIT or GL_DEPTH_BUFFER_BIT) ' Clear The Screen And The Depth Buffer
- glLoadIdentity() ' Reset The View
- glTranslatef(-1.5,0.0,-6.0) ' Move Left 1.5 Units And Into The Screen 6.0
- glBegin(GL_TRIANGLES) ' Drawing Using Triangles
- glVertex3f( 0.0, 1.0, 0.0) ' Top
- glVertex3f(-1.0,-1.0, 0.0) ' Bottom Left
- glVertex3f( 1.0,-1.0, 0.0) ' Bottom Right
- glEnd() ' Finished Drawing The Triangle
- glTranslatef(3.0,0.0,0.0) ' Move Right 3 Units
- glBegin(GL_QUADS) ' Draw A Quad
- glVertex3f(-1.0, 1.0, 0.0) ' Top Left
- glVertex3f( 1.0, 1.0, 0.0) ' Top Right
- glVertex3f( 1.0,-1.0, 0.0) ' Bottom Right
- glVertex3f(-1.0,-1.0, 0.0) ' Bottom Left
- glEnd() ' Done Drawing The Quad
- SwapBuffers ()
-